package com.tmt.im.jpa.entity;

import com.tmt.data.jpa.entity.TmtBaseEntityId;
import com.tmt.im.common.enums.ChannelType;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.hibernate.Length;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 提现绑定参数表
 *
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/6 21:11
 * @Version 1.0
 **/
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "withdraw_binding_param")
@Tag(name = "WithdrawBindingParam", description = "提现绑定参数表")
public class WithdrawBindingParam extends TmtBaseEntityId {

    @Serial
    private static final long serialVersionUID = -1599881721644164850L;

    /**
     * 支付类型
     */
    @Column(nullable = false)
    private String channelType;

    /**
     * 支付宝账号或银行卡号
     */
    private String bankCardAccount;

    /**
     * 开户行信息
     */
    private String openAccountBank;

    /**
     * 微信收款人昵称、支付宝收款人(真实姓名)、开户人姓名
     */
    @Column(nullable = false)
    private String accountHolder;

    /**
     * 收款二维码文件在OSS中的访问路径。
     */
    private String fileUri;

    /**
     * 创建人
     */
    @ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.LAZY, optional = false)
    private IMUser creator;

}
